package org.travel.api.travel.pojo;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.sql.Date;
import java.util.Objects;

@Entity
public class Comment {
    private int comId;
    private int productId;
    private int orderNo;
    private int productTypeId;
    private String context;
    private String comImg;
    private int userId;
    private Integer positionScore;
    private Integer facilitiesScore;
    private Integer serviceScore;
    private Integer hygieneScore;
    private BigDecimal sumScore;
    private Integer tripModeId;
    private Date comCreateDate;

    @Basic
    @Id
    @Column(name = "comId")
    public int getComId() {
        return comId;
    }

    public void setComId(int comId) {
        this.comId = comId;
    }

    @Basic
    @Column(name = "productId")
    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    @Basic
    @Column(name = "orderNo")
    public int getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(int orderNo) {
        this.orderNo = orderNo;
    }

    @Basic
    @Column(name = "productTypeId")
    public int getProductTypeId() {
        return productTypeId;
    }

    public void setProductTypeId(int productTypeId) {
        this.productTypeId = productTypeId;
    }

    @Basic
    @Column(name = "Context")
    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    @Basic
    @Column(name = "comImg")
    public String getComImg() {
        return comImg;
    }

    public void setComImg(String comImg) {
        this.comImg = comImg;
    }

    @Basic
    @Column(name = "userId")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "positionScore")
    public Integer getPositionScore() {
        return positionScore;
    }

    public void setPositionScore(Integer positionScore) {
        this.positionScore = positionScore;
    }

    @Basic
    @Column(name = "facilitiesScore")
    public Integer getFacilitiesScore() {
        return facilitiesScore;
    }

    public void setFacilitiesScore(Integer facilitiesScore) {
        this.facilitiesScore = facilitiesScore;
    }

    @Basic
    @Column(name = "serviceScore")
    public Integer getServiceScore() {
        return serviceScore;
    }

    public void setServiceScore(Integer serviceScore) {
        this.serviceScore = serviceScore;
    }

    @Basic
    @Column(name = "hygieneScore")
    public Integer getHygieneScore() {
        return hygieneScore;
    }

    public void setHygieneScore(Integer hygieneScore) {
        this.hygieneScore = hygieneScore;
    }

    @Basic
    @Column(name = "sumScore")
    public BigDecimal getSumScore() {
        return sumScore;
    }

    public void setSumScore(BigDecimal sumScore) {
        this.sumScore = sumScore;
    }

    @Basic
    @Column(name = "tripModeId")
    public Integer getTripModeId() {
        return tripModeId;
    }

    public void setTripModeId(Integer tripModeId) {
        this.tripModeId = tripModeId;
    }

    @Basic
    @Column(name = "comCreateDate")
    public Date getComCreateDate() {
        return comCreateDate;
    }

    public void setComCreateDate(Date comCreateDate) {
        this.comCreateDate = comCreateDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Comment comment = (Comment) o;
        return comId == comment.comId &&
                productId == comment.productId &&
                orderNo == comment.orderNo &&
                productTypeId == comment.productTypeId &&
                userId == comment.userId &&
                Objects.equals(context, comment.context) &&
                Objects.equals(comImg, comment.comImg) &&
                Objects.equals(positionScore, comment.positionScore) &&
                Objects.equals(facilitiesScore, comment.facilitiesScore) &&
                Objects.equals(serviceScore, comment.serviceScore) &&
                Objects.equals(hygieneScore, comment.hygieneScore) &&
                Objects.equals(sumScore, comment.sumScore) &&
                Objects.equals(tripModeId, comment.tripModeId) &&
                Objects.equals(comCreateDate, comment.comCreateDate);
    }

    @Override
    public int hashCode() {

        return Objects.hash(comId, productId, orderNo, productTypeId, context, comImg, userId, positionScore, facilitiesScore, serviceScore, hygieneScore, sumScore, tripModeId, comCreateDate);
    }
}
